/**
 * Copyright 2013 Viettel Telecom. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.viettel.core.entities.cms;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Index;
import org.hibernate.annotations.Parameter;
import org.hibernate.annotations.Type;

import com.viettel.core.enumtype.ServicesSMSStatus;

/**
 *  TABLE DICH VU SMS
 *  @author: ToanTM1
 *  @version: 2.1
 *  @since: 28-02-2014 - 10:19:38
 */
@Entity
@Table(name = "SERVICES_SMS")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@SequenceGenerator(name = "SEQ_STORE", sequenceName = "SERVICES_SMS_SEQ", allocationSize = 1)
public class ServicesSMS implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 4481430577057188227L;

	/**
	 * ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_STORE")
	@Column(name = "ID")
//	@Index(name="SERVICES_SMS_ID_PK")
	private Integer id;
	
	/**
	 * TEN DICH VU
	 */
	@Basic
	@Column(name = "NAME", length = 500)
	private String name;
	
	/**
	 * SMS TOI DA MOI NGAY
	 */
	@Basic
	@Column(name = "SMS_MAX", columnDefinition = "NUMBER(2,0)")
	private Integer smsMax;
	
	/**
	 * TRANG THAI
	 */
	@Basic
	@Column(name = "STATUS", columnDefinition = "NUMBER(1,0)", nullable = false)
	@Type(type = "com.viettel.core.enumtype.GenericEnumUserType", parameters = {
			@Parameter(name = "enumClass", value = "com.viettel.core.enumtype.ServicesSMSStatus"),
			@Parameter(name = "identifierMethod", value = "getValue"),
			@Parameter(name = "valueOfMethod", value = "parseValue") })
	@Index(name="SERVICES_SMS_STATUSX")
	private ServicesSMSStatus status;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getSmsMax() {
		return smsMax;
	}

	public void setSmsMax(Integer smsMax) {
		this.smsMax = smsMax;
	}

	public ServicesSMSStatus getStatus() {
		return status;
	}

	public void setStatus(ServicesSMSStatus status) {
		this.status = status;
	}
}
